$(function() {
/*	$("#wrapper").panel({
		//面板头部标题
		title: "路由费率列表",
		//面板的尺寸将自适应其父元素的尺寸
		fit: true,
		collapsible: true
	});*/
	$("#routeFeeList").datagrid({
		columns:[[{
			field:"chk", checkbox: true
		}, {
			field: "feeId", hidden: true, align: "center"
		}, {
			field: "routeNum", title: "路由号", align: "center"
		}, {
			field: "lastOrgName", title: "归属航空部", align: "center"
		}, {
			field: "lastOrgId", title: "下级中转部", align: "center"
		}, {
			field: "lastOrgId", title: "二级中转目的地", align: "center"
		}, {
			field: "effectDate", title: "生效时间", align: "center"
		}, {
			field: "lastOrgName", title: "上一站列表", align: "center"
		}, {
			field: "endWeight", title: "首重(公斤)", align: "center",
				formatter: function(value, row, index) {
					return row["routeFeeDetailList"][0]["endWeight"];
				}
		}, {
			field: "weightPrice", title: "首重价格(元/公斤)", align: "center",
				formatter: function(value, row, index) {
					return row["routeFeeDetailList"][0]["weightPrice"];
				}
		}, {
			field: "operateFee", title: "操作费(元)", align: "center",
				formatter: function(value, row, index) {
					return row["routeFeeDetailList"][0]["operateFee"];
				}
		}]],
		//自动扩大或者缩小列的尺寸来适应表格的宽度，防止页面出现横向滚动条，但是表格内部会出现滚动条
		fitColumns: true,
		//添加隔行背景颜色
		striped: true,
		method: "get",
		idField: "feeId",
		url: "/demo/grid/routefee.json",
		pagination: true
	});
});